Package com.fsf.news.handler
Class ErrorHandlerTest
java.lang.Object
com.fsf.news.handler.ErrorHandlerTest
Unit tests for ErrorHandler.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) com.fsf.news.handler.ErrorHandler(package private) com.fsf.news.exception.ResponseProcessingException(package private) Exception(package private) play.mvc.Http.RequestHeader(package private) play.mvc.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidTests onClientError.(package private) voidTests onServerError with ResponseStatus annotation.(package private) voidTests onServerError with other exception.
-
Field Details
-
errorHandler
@InjectMocks com.fsf.news.handler.ErrorHandler errorHandler -
request
@Mock play.mvc.Http.RequestHeader request -
exception
@Mock com.fsf.news.exception.ResponseProcessingException exception -
otherException
-
result
@Mock play.mvc.Result result
-
-
Constructor Details
-
ErrorHandlerTest
ErrorHandlerTest()
-
-
Method Details
-
testOnClientError
@Test void testOnClientError()Tests onClientError. -
testOnServerErrorExceptionWithResponseStatus
@Test void testOnServerErrorExceptionWithResponseStatus()Tests onServerError with ResponseStatus annotation. -
testOnServerErrorOtherException
@Test void testOnServerErrorOtherException()Tests onServerError with other exception.
-